import request from '@/utils/Request'
import { stringify } from 'qs';

export async function queryCurrent() {
  return request(`/joker/users/getCurrentUser`);
}

export async function queryByUserId(params) {
  return request(`/joker/blogs/queryByUserId?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function queryActions(params) {
  return request(`/joker/blogAction/queryList?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function queryFakeList(params) {
  return request('/joker/fake_list', {
    params,
  });
}

export async function deleteBlog(params) {
  return request(`/joker/blogs/delete?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function deleteAction(params) {
  return request(`/joker/blogAction/delete?${stringify(params)}`, {
    method: 'GET'
  });
}
